POV-Ray : Newsgroups : povray.general : Request: new simple pattern : Re: Request: new simple pattern Server Time
8 Aug 2024 16:19:06 EDT (-0400)
  Re: Request: new simple pattern  
From: Rune
Date: 7 Jan 2001 17:07:22
Message: <3a58e89a@news.povray.org>
"Chris Huff" wrote:
> I've been thinking of some extensions to the pattern syntax
> that would allow the ordinary gradient to be used this way.
> Basically allowing pattern values outside the [0, 1] range
> and specifying how they are clipped and scaled to fit in the
> proper range...it would be more flexible because you could
> specify where and how many bands you want instead of using
> yet another pattern. Probably an extension to the waveforms
> feature...

Sounds like a very good idea. I have some questions.
I don't know the POV source but judging from the way some patterns seem to
work I suspect that many patterns in fact does exceed the [0,1] range but
there's some global function that applies the mod function to all patterns
before they are returned. Is this assumption correct?

And you are thinking of alternatives to this global "mod enforcement"?

It sounds like a good idea. But exactly why does all patterns need to be in
the [0,1] range anyway? Why can't we allow any values in patterns? To access
those unlimited values you would simply allow all values in color_maps too
etc. I have never understood the reason for this limitation.

But back to the original topic. Say you made a "wave-type" that clipped
patterns at 0 and 1 instead of "mod"-ifying them. That solves a third of my
problem with the gradient pattern.

Another third of the problem is that only the x, y, and z vector can be used
plus combination such as <1,0,1> or <1,1,1>. Other vectors don't work. For
example <2.5,0,0> is converted to <1,0,0> and <0.1,0,3> is converted to
<1,0,1>. Fixing this odd behaviour would not break old scenes, but only add
new functionality to the gradient pattern. Could you do that too?

The last third of my problem is that the gradient pattern is mirrored in the
xy plane, the xz plane and the yz plane (abs functions?). I think it should
rather be mirrored in the plane perpendicular to the pattern vector (which
would give the same result when the vector is x, y or z). One of the
"wave-types" you are talking about could take care of that. It would (among
other things) take the abs of the function. This "wave-type" should then be
the default to preserve backward-compatibility.

What do you think of my suggestions?
Have I misunderstood what it's all about?

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.